<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="utf-8">
        <title>Welcome to CodeIgniter</title>
        <?php include 'style/stylesheet.html'; ?>
    </head>
    <body data-spy="scroll" data-target=".bs-docs-sidebar" data-twttr-rendered="true" screen_capture_injected="true">
        <div class="navbar navbar-inverse navbar-fixed-top" style=" box-shadow: 0px 4px 8px gray; box">
            <div class="navbar-inner">
                <div class="container">
                    <button type="button" class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
                        <span class="icon-bar"></span>
                        <span class="icon-bar"></span>
                        <span class="icon-bar"></span>
                    </button>
                    <a class="brand" href="#" onclick="location.reload(true)">Finance</a>
                    <div class="nav-collapse collapse">
                        <ul class="nav">
                            <li class="">
                                <a href="./index.html">Home</a>
                            </li>
                            <li class="">
                                <a href="welcome/showdata">link1</a>
                            </li>
                            <li class="active">
                                <a href="#">link2</a>
                            </li>
                            <li class="">
                                <a href="#">link3</a>
                            </li>
                            <li class="">
                                <a href="#">link4</a>
                            </li>
                            <li class="">
                                <a href="#">link5</a>
                            </li>
                        </ul>
                    </div>
                </div>
            </div>
        </div>
        <header class="jumbotron subhead" id="overview" style="padding-top: 40px;">
            <div class="container">
                <h1>Welcome!</h1>
                <p class="lead">The page you are looking at is being generated dynamically by CodeIgniter.</p>
            </div>
        </header>
        <div class="container">
            <div class="row">
                <div class="span12">
                    <table>
                        <thead>
                        <th>Date</th>
                        <th>Name</th>
                        <th>Company</th>
                        <th>Amount</th>
                        <th>Checked</th>
                        </thead>
                        <tbody style=" text-align: center">
                            <tr>
                                <td>
                                    <input type="date" name="date" class="span3">    
                                </td>
                                <td>
                                    <input type="text" name="name" class="span2">
                                </td>
                                <td>
                                    <input type="text" name="Company" class="span3">
                                </td>
                                <td>
                                    <input type="currency" name="currency" class="span3" style=" -webkit-border-radius: 4px; margin-bottom: 5px; height: 26px">
                                </td>
                                <td>
                                    <input type="checkbox" name="checked">
                                </td>
                                <td>
                                    <button type="submit" class="btn">Submit</button>
                                </td>
                            </tr>
                        </tbody>
                    </table>
                    <hr>
                </div>
                
                <div class="span12">

                    <?php if (isset($data) && count($data)) { ?>

                        <table id="finance" style="width: 100%" class="data">
                            <thead>
                            <th>Date</th>
                            <th>Company</th>
                            <th>Name</th>
                            <th>Amount</th>
                            <th>Checked</th>
                            </thead>
                            <tbody>
                                <?php
                                foreach ($data as $row) {
                                    echo "<tr>";
                                    echo "<td>";
                                    echo $row['date'];
                                    echo "</td>";
                                    echo "<td>";
                                    echo $row['company'];
                                    echo "</td>";
                                    echo "<td>";
                                    echo $row['name'];
                                    echo "</td>";
                                    echo "<td>";
                                    echo $row['amount'];
                                    echo "</td>";
                                    echo "<td>";
                                    echo $row['checked'];
                                    echo "</td>";
                                    echo "</tr>";
                                }
                                ?>                            
                            </tbody>
                        </table>                 

<?php
} else {
    echo "www";
}
?>
                    <!--Body content-->
                    <hr>
                </div>

            </div>
        </div>
        <!--<footer><p class="footer">Page rendered in <strong>{elapsed_time}</strong> seconds</p></footer>-->
        <div id="footer" style="background-color: #f5f5f5">
            <div class="container">
                <p class="muted credit">Copyright@<a>Wang.Zhen</a>.2013 | Reference to <a href="http://twitter.github.io/bootstrap/index.html">Bootstrap</a></p>
            </div>
        </div>

    </body>
</html>